/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package podologia.beansDB;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Hernan
 */
@Entity
@Table(name = "fdigitalxatencion")
@NamedQueries({@NamedQuery(name = "Fdigitalxatencion.findByPie", query = "SELECT f FROM Fdigitalxatencion f WHERE f.pie = :pie"), @NamedQuery(name = "Fdigitalxatencion.findByObservacion", query = "SELECT f FROM Fdigitalxatencion f WHERE f.observacion = :observacion"), @NamedQuery(name = "Fdigitalxatencion.findByIdFDigitalAatencion", query = "SELECT f FROM Fdigitalxatencion f WHERE f.idFDigitalAatencion = :idFDigitalAatencion")})
public class Fdigitalxatencion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "pie")
    private Short pie;
    @Column(name = "observacion")
    private String observacion;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE)
    @Column(name = "idFDigitalAatencion", nullable = false)
    private Integer idFDigitalAatencion;
    @JoinColumn(name = "idAtencion", referencedColumnName = "idAtencion")
    @ManyToOne
    private Atencion idAtencion;
    @JoinColumn(name = "idFDigital", referencedColumnName = "idFDigital")
    @ManyToOne
    private Fdigital idFDigital;

    public Fdigitalxatencion() {
    }

    public Fdigitalxatencion(Integer idFDigitalAatencion) {
        this.idFDigitalAatencion = idFDigitalAatencion;
    }

    public Short getPie() {
        return pie;
    }

    public void setPie(Short pie) {
        this.pie = pie;
    }

    public String getObservacion() {
        return observacion;
    }

    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }

    public Integer getIdFDigitalAatencion() {
        return idFDigitalAatencion;
    }

    public void setIdFDigitalAatencion(Integer idFDigitalAatencion) {
        this.idFDigitalAatencion = idFDigitalAatencion;
    }

    public Atencion getIdAtencion() {
        return idAtencion;
    }

    public void setIdAtencion(Atencion idAtencion) {
        this.idAtencion = idAtencion;
    }

    public Fdigital getIdFDigital() {
        return idFDigital;
    }

    public void setIdFDigital(Fdigital idFDigital) {
        this.idFDigital = idFDigital;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idFDigitalAatencion != null ? idFDigitalAatencion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fdigitalxatencion)) {
            return false;
        }
        Fdigitalxatencion other = (Fdigitalxatencion) object;
        if ((this.idFDigitalAatencion == null && other.idFDigitalAatencion != null) || (this.idFDigitalAatencion != null && !this.idFDigitalAatencion.equals(other.idFDigitalAatencion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.Fdigitalxatencion[idFDigitalAatencion=" + idFDigitalAatencion + "]";
    }

}
